package com.agileboot.attendance.domain.order.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.Date;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import lombok.Data;

/**
 * 订单请求参数
 *
 * @author agileboot
 */
@Data
@ApiModel("订单请求参数")
public class OrderRequest {

    @ApiModelProperty("订单ID")
    private Long orderId;

    @ApiModelProperty(value = "订单编码", required = true)
    @NotBlank(message = "订单编码不能为空")
    private String orderCode;

    @ApiModelProperty(value = "项目ID", required = true)
    @NotNull(message = "项目ID不能为空")
    private Long projectId;

    @ApiModelProperty(value = "供应商ID", required = true)
    @NotNull(message = "供应商ID不能为空")
    private Long supplierId;

    @ApiModelProperty(value = "起始日期", required = true)
    @NotNull(message = "起始日期不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date startDate;

    @ApiModelProperty("结束日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date endDate;

    @ApiModelProperty(value = "结算周期（1月 2季 3年 4自定义）", required = true)
    @NotBlank(message = "结算周期不能为空")
    private String settlementCycle;

    @ApiModelProperty("状态（0进行中 1已完成 2已取消）")
    private String status;

    @ApiModelProperty("总金额")
    private BigDecimal totalAmount;

    @ApiModelProperty("备注")
    private String remark;
} 